package com.bmps.springcloud.insuredmicroservice.model.trail.request;

import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author :  zlc
 * @Date : 2019/9/10 10:41
 **/
public class TrailPolicyInfoModel implements Serializable {

    private String contNo;

    private String prtNo;

    @JSONField(format = "yyyy-MM-dd")
    private Date polApplyDate;

    @JSONField(format = "yyyy-MM-dd")
    private Date cvalidate;

    private String manageCom;

    private String saleChnl;

    private String saleChnlChild;

    private String agencyCode;

    private String orderNo;

    
    public String getContNo() {
        return contNo;
    }

    public void setContNo(String contNo) {
        this.contNo = contNo;
    }

    public String getPrtNo() {
        return prtNo;
    }

    public void setPrtNo(String prtNo) {
        this.prtNo = prtNo;
    }

    public Date getPolApplyDate() {
        return polApplyDate;
    }

    public void setPolApplyDate(Date polApplyDate) {
        this.polApplyDate = polApplyDate;
    }

    public Date getCvalidate() {
        return cvalidate;
    }

    public void setCvalidate(Date cvalidate) {
        this.cvalidate = cvalidate;
    }

    public String getManageCom() {
        return manageCom;
    }

    public void setManageCom(String manageCom) {
        this.manageCom = manageCom;
    }

    public String getSaleChnl() {
        return saleChnl;
    }

    public void setSaleChnl(String saleChnl) {
        this.saleChnl = saleChnl;
    }

    public String getSaleChnlChild() {
        return saleChnlChild;
    }

    public void setSaleChnlChild(String saleChnlChild) {
        this.saleChnlChild = saleChnlChild;
    }

    public String getAgencyCode() {
        return agencyCode;
    }

    public void setAgencyCode(String agencyCode) {
        this.agencyCode = agencyCode;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;}

        if (o == null || getClass() != o.getClass()) {return false;}

        TrailPolicyInfoModel that = (TrailPolicyInfoModel) o;

        return new EqualsBuilder()
                .append(contNo, that.contNo)
                .append(prtNo, that.prtNo)
                .append(polApplyDate, that.polApplyDate)
                .append(cvalidate, that.cvalidate)
                .append(manageCom, that.manageCom)
                .append(saleChnl, that.saleChnl)
                .append(saleChnlChild, that.saleChnlChild)
                .append(agencyCode, that.agencyCode)
                .append(orderNo, that.orderNo)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(contNo)
                .append(prtNo)
                .append(polApplyDate)
                .append(cvalidate)
                .append(manageCom)
                .append(saleChnl)
                .append(saleChnlChild)
                .append(agencyCode)
                .append(orderNo)
                .toHashCode();
    }

    @Override
    public String toString() {
        return "TrailPolicyInfoModel{" +
                "contNo='" + contNo + '\'' +
                ", prtNo='" + prtNo + '\'' +
                ", polApplyDate=" + polApplyDate +
                ", cvalidate=" + cvalidate +
                ", manageCom='" + manageCom + '\'' +
                ", saleChnl='" + saleChnl + '\'' +
                ", saleChnlChild='" + saleChnlChild + '\'' +
                ", agencyCode='" + agencyCode + '\'' +
                ", orderNo='" + orderNo + '\'' +
                '}';
    }
}
